﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Qplus.protocol
{
    public class C2U_REQ_LOGIN : OutPacket
    {


        /**
	 ```* 登陆用户服务器
	 ```* @param version 协议版本
	 ```* @param terminalName 终端名
	 ```* @param userID 用户id
	 ```* @return
	 ```*/
        public C2U_REQ_LOGIN loginUser(String protocolVer, String terminalName, byte[] key, long userID)
        {
            init();
            needReply = true;
            int len = 0;
            len += putVersion(protocolVer);

            len += putString1(terminalName);
            len += putN(key, 0, key.Length);
            len += put4(userID);

            postLen(len);
            return this;
        } 

    }
}
